package com.example.sharding.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.sharding.dao.SysDictionaryMapper;
import com.example.sharding.enerty.SysDictionary;
import com.example.sharding.service.SysDictionaryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


/**
 * @program: test_demo
 * @description:
 * @author: yanghua
 * @create: 2021-11-01 11:56
 **/
@Service
public class SysDictionaryServiceImpl extends ServiceImpl<SysDictionaryMapper, SysDictionary> implements SysDictionaryService {

    @Resource
    private SysDictionaryMapper sysDictionaryMapper;

    @Override
    public IPage<SysDictionary> getPage() {

        LambdaQueryWrapper<SysDictionary> queryWrapper = new LambdaQueryWrapper();
        Page<SysDictionary> page = new Page<>(1,10);
        IPage<SysDictionary> selectPage = sysDictionaryMapper.selectPage(page, queryWrapper);

        return selectPage;
    }
}
